package rezetkaTest;

import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
import rezetkaPages.HomePage;
import rezetkaPages.NavigationPage;

/**
 * Created by IIGalytska on 10.04.14.
 */
public class RezetkaAutorizationTestNegative extends PrePostConditions{

    @Parameters("homeUrl")
    @BeforeMethod
    public void initState(String homeUrl)
    {
        driver.get(homeUrl);

    }





    @Test
    @Parameters({"mail","passwordInvalid","homeUrl"})
    public void AutorizationTestNegative(String mail, String passwordInvalid, String homeUrl){

        HomePage home = new HomePage(driver);

        NavigationPage myPage = home.authorizationNegative(mail, passwordInvalid);

        Assert.assertEquals(homeUrl, myPage.checkPageUrl());
    }
















}
